/*     */ package com.zimbra.cs.imap;
/*     */ 
/*     */ import com.zimbra.common.soap.Element;
/*     */ import com.zimbra.common.util.Log;
/*     */ import com.zimbra.common.util.ZimbraLog;
/*     */ import com.zimbra.cs.mailbox.Folder;
/*     */ import com.zimbra.cs.mailbox.MailItem;
/*     */ import com.zimbra.cs.mailbox.Mailbox;
/*     */ import com.zimbra.cs.mailbox.Tag;
/*     */ import com.zimbra.cs.session.PendingModifications;
/*     */ import com.zimbra.cs.session.PendingModifications.Change;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import java.util.Map.Entry;
/*     */ 
/*     */ public class ImapSession extends com.zimbra.cs.session.Session
/*     */ {
/*     */   static abstract interface ImapFolderData
/*     */   {
/*     */     public abstract int getId();
/*     */     
/*     */     public abstract int getSize();
/*     */     
/*     */     public abstract boolean isWritable();
/*     */     
/*     */     public abstract boolean hasExpunges();
/*     */     
/*     */     public abstract boolean hasNotifications();
/*     */     
/*     */     public abstract void doEncodeState(Element paramElement);
/*     */     
/*     */     public abstract void endSelect();
/*     */     
/*     */     public abstract void handleTagDelete(int paramInt1, int paramInt2, PendingModifications.Change paramChange);
/*     */     
/*     */     public abstract void handleTagRename(int paramInt, Tag paramTag, PendingModifications.Change paramChange);
/*     */     
/*     */     public abstract void handleItemDelete(int paramInt1, int paramInt2, PendingModifications.Change paramChange);
/*     */     
/*     */     public abstract void handleItemCreate(int paramInt, MailItem paramMailItem, ImapSession.AddedItems paramAddedItems);
/*     */     
/*     */     public abstract void handleFolderRename(int paramInt, Folder paramFolder, PendingModifications.Change paramChange);
/*     */     
/*     */     public abstract void handleItemUpdate(int paramInt, PendingModifications.Change paramChange, ImapSession.AddedItems paramAddedItems);
/*     */     
/*     */     public abstract void handleAddedMessages(int paramInt, ImapSession.AddedItems paramAddedItems);
/*     */     
/*     */     public abstract void finishNotification(int paramInt) throws java.io.IOException;
/*     */   }
/*     */   
/*  51 */   private static final ImapSessionManager MANAGER = ;
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   private final ImapPath mPath;
/*     */   
/*     */ 
/*     */ 
/*     */   private final int mFolderId;
/*     */   
/*     */ 
/*     */ 
/*     */   private final boolean mIsVirtual;
/*     */   
/*     */ 
/*     */ 
/*     */   private ImapFolderData mFolder;
/*     */   
/*     */ 
/*     */ 
/*     */   private ImapHandler handler;
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*  77 */   private Map<Integer, Integer> renumberCount = new java.util.concurrent.ConcurrentHashMap();
/*     */   
/*     */   ImapSession(ImapFolder i4folder, ImapHandler handler) throws com.zimbra.common.service.ServiceException {
/*  80 */     super(i4folder.getCredentials().getAccountId(), i4folder.getPath().getOwnerAccountId(), com.zimbra.cs.session.Session.Type.IMAP);
/*  81 */     this.mPath = i4folder.getPath();
/*  82 */     this.mFolderId = i4folder.getId();
/*  83 */     this.mIsVirtual = i4folder.isVirtual();
/*  84 */     this.mFolder = i4folder;
/*  85 */     this.handler = handler;
/*     */     
/*  87 */     i4folder.setSession(this);
/*     */   }
/*     */   
/*     */   ImapHandler getHandler() {
/*  91 */     return this.handler;
/*     */   }
/*     */   
/*     */   ImapFolder getImapFolder() throws ImapSessionClosedException {
/*  95 */     MANAGER.recordAccess(this);
/*  96 */     return reload();
/*     */   }
/*     */   
/*     */   ImapPath getPath() {
/* 100 */     return this.mPath;
/*     */   }
/*     */   
/*     */   boolean isInteractive() {
/* 104 */     return this.handler != null;
/*     */   }
/*     */   
/*     */   public boolean isWritable() {
/* 108 */     return (isInteractive()) && (this.mFolder.isWritable());
/*     */   }
/*     */   
/*     */   boolean isVirtual() {
/* 112 */     return this.mIsVirtual;
/*     */   }
/*     */   
/*     */   public int getFolderId() {
/* 116 */     return this.mFolderId;
/*     */   }
/*     */   
/*     */   boolean hasNotifications() {
/* 120 */     return this.mFolder.hasNotifications();
/*     */   }
/*     */   
/*     */   boolean hasExpunges() {
/* 124 */     return this.mFolder.hasExpunges();
/*     */   }
/*     */   
/*     */   boolean isExtensionActivated(ImapHandler.ImapExtension ext)
/*     */   {
/* 129 */     switch (ext) {
/*     */     case CONDSTORE: 
/* 131 */       return (!this.mIsVirtual) && (this.handler.sessionActivated(ext));
/*     */     }
/* 133 */     return false;
/*     */   }
/*     */   
/*     */   boolean isSerialized()
/*     */   {
/* 138 */     return this.mFolder instanceof PagedFolderData;
/*     */   }
/*     */   
/*     */   synchronized int getFootprint()
/*     */   {
/* 143 */     return (this.mFolder instanceof ImapFolder) ? ((ImapFolder)this.mFolder).getSize() : 0;
/*     */   }
/*     */   
/*     */   int getEstimatedSize() {
/* 147 */     return this.mFolder.getSize();
/*     */   }
/*     */   
/*     */   boolean requiresReload() {
/* 151 */     ImapFolderData fdata = this.mFolder;
/* 152 */     return (fdata instanceof ImapFolder) ? false : ((PagedFolderData)fdata).notificationsFull();
/*     */   }
/*     */   
/*     */   int getRenumberCount(ImapMessage msg) {
/* 156 */     Integer count = (Integer)this.renumberCount.get(Integer.valueOf(msg.msgId));
/* 157 */     return count == null ? 0 : count.intValue();
/*     */   }
/*     */   
/*     */   void incrementRenumber(ImapMessage msg) {
/* 161 */     Integer count = (Integer)this.renumberCount.get(Integer.valueOf(msg.msgId));
/* 162 */     count = Integer.valueOf(count != null ? count.intValue() + 1 : 1);
/* 163 */     this.renumberCount.put(Integer.valueOf(msg.msgId), count);
/*     */   }
/*     */   
/*     */   void resetRenumber() {
/* 167 */     this.renumberCount.clear();
/*     */   }
/*     */   
/*     */   boolean hasFailedRenumber()
/*     */   {
/* 172 */     for (Integer count : this.renumberCount.values()) {
/* 173 */       if (count.intValue() > 5) {
/* 174 */         return true;
/*     */       }
/*     */     }
/* 177 */     return false;
/*     */   }
/*     */   
/*     */   boolean isFailedRenumber(ImapMessage msg) {
/* 181 */     Integer count = (Integer)this.renumberCount.get(Integer.valueOf(msg.msgId));
/* 182 */     return count == null ? false : isFailed(count);
/*     */   }
/*     */   
/*     */   private boolean isFailed(Integer count) {
/* 186 */     return count.intValue() > 5;
/*     */   }
/*     */   
/*     */   void inactivate() {
/* 190 */     if (!isInteractive()) {
/* 191 */       return;
/*     */     }
/*     */     
/* 194 */     if (isWritable()) {
/* 195 */       snapshotRECENT();
/*     */     }
/*     */     
/* 198 */     this.mFolder.endSelect();
/*     */     
/* 200 */     removeFromSessionCache();
/* 201 */     this.handler = null;
/*     */   }
/*     */   
/*     */ 
/*     */   private void snapshotRECENT()
/*     */   {
/*     */     try
/*     */     {
/* 209 */       Mailbox mbox = this.mailbox;
/* 210 */       if ((mbox != null) && (isWritable())) {
/* 211 */         mbox.recordImapSession(this.mFolderId);
/*     */       }
/*     */     }
/*     */     catch (com.zimbra.cs.mailbox.MailServiceException.NoSuchItemException nsie) {}catch (Exception e)
/*     */     {
/* 216 */       ZimbraLog.session.warn("exception recording unloaded session's RECENT limit", e);
/*     */     }
/*     */   }
/*     */   
/*     */   protected boolean isMailboxListener()
/*     */   {
/* 222 */     return true;
/*     */   }
/*     */   
/*     */   protected boolean isRegisteredInCache()
/*     */   {
/* 227 */     return true;
/*     */   }
/*     */   
/*     */   public void doEncodeState(Element parent)
/*     */   {
/* 232 */     this.mFolder.doEncodeState(parent.addElement("imap"));
/*     */   }
/*     */   
/*     */   protected long getSessionIdleLifetime()
/*     */   {
/* 237 */     return this.handler.getConfig().getAuthenticatedMaxIdleTime() * 1000;
/*     */   }
/*     */   
/*     */ 
/*     */   public com.zimbra.cs.session.Session unregister()
/*     */   {
/* 243 */     MANAGER.closeFolder(this, true);
/* 244 */     return detach();
/*     */   }
/*     */   
/*     */   /* Error */
/*     */   com.zimbra.cs.session.Session detach()
/*     */   {
/*     */     // Byte code:
/*     */     //   0: aload_0
/*     */     //   1: getfield 49	com/zimbra/cs/imap/ImapSession:mailbox	Lcom/zimbra/cs/mailbox/Mailbox;
/*     */     //   4: astore_1
/*     */     //   5: aload_1
/*     */     //   6: ifnull +10 -> 16
/*     */     //   9: aload_1
/*     */     //   10: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   13: invokevirtual 64	com/zimbra/cs/mailbox/MailboxLock:lock	()V
/*     */     //   16: aload_0
/*     */     //   17: dup
/*     */     //   18: astore_2
/*     */     //   19: monitorenter
/*     */     //   20: getstatic 18	com/zimbra/cs/imap/ImapSession:MANAGER	Lcom/zimbra/cs/imap/ImapSessionManager;
/*     */     //   23: aload_0
/*     */     //   24: invokevirtual 65	com/zimbra/cs/imap/ImapSessionManager:uncacheSession	(Lcom/zimbra/cs/imap/ImapSession;)V
/*     */     //   27: aload_0
/*     */     //   28: invokevirtual 66	com/zimbra/cs/imap/ImapSession:isRegistered	()Z
/*     */     //   31: ifeq +10 -> 41
/*     */     //   34: aload_0
/*     */     //   35: invokespecial 67	com/zimbra/cs/session/Session:unregister	()Lcom/zimbra/cs/session/Session;
/*     */     //   38: goto +4 -> 42
/*     */     //   41: aload_0
/*     */     //   42: astore_3
/*     */     //   43: aload_2
/*     */     //   44: monitorexit
/*     */     //   45: aload_1
/*     */     //   46: ifnull +10 -> 56
/*     */     //   49: aload_1
/*     */     //   50: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   53: invokevirtual 68	com/zimbra/cs/mailbox/MailboxLock:release	()V
/*     */     //   56: aload_3
/*     */     //   57: areturn
/*     */     //   58: astore 4
/*     */     //   60: aload_2
/*     */     //   61: monitorexit
/*     */     //   62: aload 4
/*     */     //   64: athrow
/*     */     //   65: astore 5
/*     */     //   67: aload_1
/*     */     //   68: ifnull +10 -> 78
/*     */     //   71: aload_1
/*     */     //   72: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   75: invokevirtual 68	com/zimbra/cs/mailbox/MailboxLock:release	()V
/*     */     //   78: aload 5
/*     */     //   80: athrow
/*     */     // Line number table:
/*     */     //   Java source line #248	-> byte code offset #0
/*     */     //   Java source line #249	-> byte code offset #5
/*     */     //   Java source line #250	-> byte code offset #9
/*     */     //   Java source line #253	-> byte code offset #16
/*     */     //   Java source line #254	-> byte code offset #20
/*     */     //   Java source line #255	-> byte code offset #27
/*     */     //   Java source line #258	-> byte code offset #45
/*     */     //   Java source line #259	-> byte code offset #49
/*     */     //   Java source line #256	-> byte code offset #58
/*     */     //   Java source line #258	-> byte code offset #65
/*     */     //   Java source line #259	-> byte code offset #71
/*     */     // Local variable table:
/*     */     //   start	length	slot	name	signature
/*     */     //   0	81	0	this	ImapSession
/*     */     //   4	68	1	mbox	Mailbox
/*     */     //   42	15	3	localImapSession	ImapSession
/*     */     //   58	5	4	localObject1	Object
/*     */     //   65	14	5	localObject2	Object
/*     */     // Exception table:
/*     */     //   from	to	target	type
/*     */     //   20	45	58	finally
/*     */     //   58	62	58	finally
/*     */     //   16	45	65	finally
/*     */     //   58	67	65	finally
/*     */   }
/*     */   
/*     */   protected void cleanup()
/*     */   {
/* 266 */     ImapHandler i4handler = this.handler;
/* 267 */     if (i4handler != null) {
/* 268 */       ZimbraLog.imap.debug("dropping connection because Session is closing");
/* 269 */       i4handler.close();
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   private String serialize(boolean active)
/*     */     throws com.zimbra.common.service.ServiceException
/*     */   {
/* 282 */     ImapFolder i4folder = (this.mFolder instanceof ImapFolder) ? (ImapFolder)this.mFolder : null;
/* 283 */     if (i4folder == null) {
/* 284 */       return null;
/*     */     }
/*     */     
/* 287 */     if (!isRegistered()) {
/* 288 */       throw com.zimbra.common.service.ServiceException.FAILURE("cannot serialize unregistered session", null);
/*     */     }
/*     */     
/*     */ 
/* 292 */     if (!isInteractive()) {
/* 293 */       i4folder.collapseExpunged(false);
/*     */     }
/*     */     
/* 296 */     String cachekey = MANAGER.cacheKey(this, active);
/* 297 */     MANAGER.serialize(cachekey, i4folder);
/* 298 */     return cachekey;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   void unload(boolean active)
/*     */     throws com.zimbra.common.service.ServiceException
/*     */   {
/* 307 */     Mailbox mbox = this.mailbox;
/* 308 */     if (mbox == null) {
/* 309 */       return;
/*     */     }
/*     */     
/*     */ 
/* 313 */     mbox.lock.lock();
/*     */     try {
/* 315 */       synchronized (this) {
/* 316 */         if ((this.mFolder instanceof ImapFolder)) {
/* 317 */           this.mFolder = new PagedFolderData(serialize(active), (ImapFolder)this.mFolder);
/* 318 */         } else if ((this.mFolder instanceof PagedFolderData)) {
/* 319 */           PagedFolderData paged = (PagedFolderData)this.mFolder;
/* 320 */           if ((paged.getCacheKey() == null) || (!paged.getCacheKey().equals(MANAGER.cacheKey(this, active))))
/*     */           {
/* 322 */             ZimbraLog.imap.trace("relocating cached item to %s already unloaded but cache key mismatched", new Object[] { active ? "active" : "inactive" });
/* 323 */             ImapFolder folder = null;
/*     */             try {
/* 325 */               folder = reload();
/* 326 */               if (folder != null) {
/* 327 */                 this.mFolder = new PagedFolderData(serialize(active), folder);
/*     */               } else {
/* 329 */                 ZimbraLog.imap.debug("folder not found while reloading for relocate. probably already evicted");
/*     */               }
/*     */             } catch (ImapSessionClosedException e) {
/* 332 */               throw com.zimbra.common.service.ServiceException.FAILURE("Session closed while relocating paged item", e);
/*     */             }
/*     */           }
/*     */         }
/*     */       }
/*     */     } finally {
/* 338 */       mbox.lock.release();
/*     */     }
/*     */   }
/*     */   
/*     */   /* Error */
/*     */   ImapFolder reload()
/*     */     throws ImapSessionClosedException
/*     */   {
/*     */     // Byte code:
/*     */     //   0: aload_0
/*     */     //   1: getfield 49	com/zimbra/cs/imap/ImapSession:mailbox	Lcom/zimbra/cs/mailbox/Mailbox;
/*     */     //   4: astore_1
/*     */     //   5: aload_1
/*     */     //   6: ifnonnull +11 -> 17
/*     */     //   9: new 88	com/zimbra/cs/imap/ImapSessionClosedException
/*     */     //   12: dup
/*     */     //   13: invokespecial 90	com/zimbra/cs/imap/ImapSessionClosedException:<init>	()V
/*     */     //   16: athrow
/*     */     //   17: aload_1
/*     */     //   18: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   21: invokevirtual 64	com/zimbra/cs/mailbox/MailboxLock:lock	()V
/*     */     //   24: aload_0
/*     */     //   25: dup
/*     */     //   26: astore_2
/*     */     //   27: monitorenter
/*     */     //   28: aload_0
/*     */     //   29: getfield 1	com/zimbra/cs/imap/ImapSession:mFolder	Lcom/zimbra/cs/imap/ImapSession$ImapFolderData;
/*     */     //   32: instanceof 28
/*     */     //   35: ifeq +192 -> 227
/*     */     //   38: aload_0
/*     */     //   39: getfield 1	com/zimbra/cs/imap/ImapSession:mFolder	Lcom/zimbra/cs/imap/ImapSession$ImapFolderData;
/*     */     //   42: checkcast 28	com/zimbra/cs/imap/ImapSession$PagedFolderData
/*     */     //   45: astore_3
/*     */     //   46: getstatic 18	com/zimbra/cs/imap/ImapSession:MANAGER	Lcom/zimbra/cs/imap/ImapSessionManager;
/*     */     //   49: aload_3
/*     */     //   50: invokevirtual 80	com/zimbra/cs/imap/ImapSession$PagedFolderData:getCacheKey	()Ljava/lang/String;
/*     */     //   53: invokevirtual 91	com/zimbra/cs/imap/ImapSessionManager:deserialize	(Ljava/lang/String;)Lcom/zimbra/cs/imap/ImapFolder;
/*     */     //   56: astore 4
/*     */     //   58: aload 4
/*     */     //   60: ifnonnull +47 -> 107
/*     */     //   63: aload_3
/*     */     //   64: invokevirtual 80	com/zimbra/cs/imap/ImapSession$PagedFolderData:getCacheKey	()Ljava/lang/String;
/*     */     //   67: invokestatic 92	com/zimbra/cs/imap/ImapSessionManager:isActiveKey	(Ljava/lang/String;)Z
/*     */     //   70: ifeq +22 -> 92
/*     */     //   73: getstatic 69	com/zimbra/common/util/ZimbraLog:imap	Lcom/zimbra/common/util/Log;
/*     */     //   76: ldc 93
/*     */     //   78: iconst_1
/*     */     //   79: anewarray 83	java/lang/Object
/*     */     //   82: dup
/*     */     //   83: iconst_0
/*     */     //   84: aload_3
/*     */     //   85: invokevirtual 80	com/zimbra/cs/imap/ImapSession$PagedFolderData:getCacheKey	()Ljava/lang/String;
/*     */     //   88: aastore
/*     */     //   89: invokevirtual 94	com/zimbra/common/util/Log:debug	(Ljava/lang/String;[Ljava/lang/Object;)V
/*     */     //   92: aconst_null
/*     */     //   93: astore 5
/*     */     //   95: aload_2
/*     */     //   96: monitorexit
/*     */     //   97: aload_1
/*     */     //   98: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   101: invokevirtual 68	com/zimbra/cs/mailbox/MailboxLock:release	()V
/*     */     //   104: aload 5
/*     */     //   106: areturn
/*     */     //   107: aload_3
/*     */     //   108: aload 4
/*     */     //   110: invokevirtual 95	com/zimbra/cs/imap/ImapSession$PagedFolderData:restore	(Lcom/zimbra/cs/imap/ImapFolder;)V
/*     */     //   113: goto +34 -> 147
/*     */     //   116: astore 5
/*     */     //   118: getstatic 69	com/zimbra/common/util/ZimbraLog:imap	Lcom/zimbra/common/util/Log;
/*     */     //   121: ldc 97
/*     */     //   123: aload_3
/*     */     //   124: invokevirtual 80	com/zimbra/cs/imap/ImapSession$PagedFolderData:getCacheKey	()Ljava/lang/String;
/*     */     //   127: aload 5
/*     */     //   129: invokevirtual 98	com/zimbra/common/util/Log:warn	(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Throwable;)V
/*     */     //   132: aconst_null
/*     */     //   133: astore 6
/*     */     //   135: aload_2
/*     */     //   136: monitorexit
/*     */     //   137: aload_1
/*     */     //   138: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   141: invokevirtual 68	com/zimbra/cs/mailbox/MailboxLock:release	()V
/*     */     //   144: aload 6
/*     */     //   146: areturn
/*     */     //   147: aload_0
/*     */     //   148: aload 4
/*     */     //   150: putfield 1	com/zimbra/cs/imap/ImapSession:mFolder	Lcom/zimbra/cs/imap/ImapSession$ImapFolderData;
/*     */     //   153: aload_3
/*     */     //   154: invokevirtual 99	com/zimbra/cs/imap/ImapSession$PagedFolderData:replay	()V
/*     */     //   157: aload_0
/*     */     //   158: invokevirtual 100	com/zimbra/cs/imap/ImapSession:hasFailedRenumber	()Z
/*     */     //   161: ifeq +25 -> 186
/*     */     //   164: aload_0
/*     */     //   165: aload_3
/*     */     //   166: invokevirtual 80	com/zimbra/cs/imap/ImapSession$PagedFolderData:getCacheKey	()Ljava/lang/String;
/*     */     //   169: invokevirtual 101	com/zimbra/cs/imap/ImapSession:handleRenumberError	(Ljava/lang/String;)Lcom/zimbra/cs/imap/ImapFolder;
/*     */     //   172: astore 5
/*     */     //   174: aload_2
/*     */     //   175: monitorexit
/*     */     //   176: aload_1
/*     */     //   177: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   180: invokevirtual 68	com/zimbra/cs/mailbox/MailboxLock:release	()V
/*     */     //   183: aload 5
/*     */     //   185: areturn
/*     */     //   186: goto +27 -> 213
/*     */     //   189: astore 5
/*     */     //   191: aload_0
/*     */     //   192: aload_3
/*     */     //   193: invokevirtual 80	com/zimbra/cs/imap/ImapSession$PagedFolderData:getCacheKey	()Ljava/lang/String;
/*     */     //   196: invokevirtual 101	com/zimbra/cs/imap/ImapSession:handleRenumberError	(Ljava/lang/String;)Lcom/zimbra/cs/imap/ImapFolder;
/*     */     //   199: astore 6
/*     */     //   201: aload_2
/*     */     //   202: monitorexit
/*     */     //   203: aload_1
/*     */     //   204: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   207: invokevirtual 68	com/zimbra/cs/mailbox/MailboxLock:release	()V
/*     */     //   210: aload 6
/*     */     //   212: areturn
/*     */     //   213: aload_0
/*     */     //   214: invokevirtual 21	com/zimbra/cs/imap/ImapSession:isInteractive	()Z
/*     */     //   217: ifne +10 -> 227
/*     */     //   220: aload 4
/*     */     //   222: iconst_0
/*     */     //   223: invokevirtual 75	com/zimbra/cs/imap/ImapFolder:collapseExpunged	(Z)Ljava/util/List;
/*     */     //   226: pop
/*     */     //   227: aload_0
/*     */     //   228: getfield 1	com/zimbra/cs/imap/ImapSession:mFolder	Lcom/zimbra/cs/imap/ImapSession$ImapFolderData;
/*     */     //   231: checkcast 29	com/zimbra/cs/imap/ImapFolder
/*     */     //   234: astore_3
/*     */     //   235: aload_2
/*     */     //   236: monitorexit
/*     */     //   237: aload_1
/*     */     //   238: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   241: invokevirtual 68	com/zimbra/cs/mailbox/MailboxLock:release	()V
/*     */     //   244: aload_3
/*     */     //   245: areturn
/*     */     //   246: astore 7
/*     */     //   248: aload_2
/*     */     //   249: monitorexit
/*     */     //   250: aload 7
/*     */     //   252: athrow
/*     */     //   253: astore 8
/*     */     //   255: aload_1
/*     */     //   256: getfield 63	com/zimbra/cs/mailbox/Mailbox:lock	Lcom/zimbra/cs/mailbox/MailboxLock;
/*     */     //   259: invokevirtual 68	com/zimbra/cs/mailbox/MailboxLock:release	()V
/*     */     //   262: aload 8
/*     */     //   264: athrow
/*     */     // Line number table:
/*     */     //   Java source line #343	-> byte code offset #0
/*     */     //   Java source line #344	-> byte code offset #5
/*     */     //   Java source line #345	-> byte code offset #9
/*     */     //   Java source line #349	-> byte code offset #17
/*     */     //   Java source line #351	-> byte code offset #24
/*     */     //   Java source line #353	-> byte code offset #28
/*     */     //   Java source line #354	-> byte code offset #38
/*     */     //   Java source line #355	-> byte code offset #46
/*     */     //   Java source line #356	-> byte code offset #58
/*     */     //   Java source line #357	-> byte code offset #63
/*     */     //   Java source line #358	-> byte code offset #73
/*     */     //   Java source line #360	-> byte code offset #92
/*     */     //   Java source line #387	-> byte code offset #97
/*     */     //   Java source line #363	-> byte code offset #107
/*     */     //   Java source line #367	-> byte code offset #113
/*     */     //   Java source line #364	-> byte code offset #116
/*     */     //   Java source line #365	-> byte code offset #118
/*     */     //   Java source line #366	-> byte code offset #132
/*     */     //   Java source line #387	-> byte code offset #137
/*     */     //   Java source line #369	-> byte code offset #147
/*     */     //   Java source line #372	-> byte code offset #153
/*     */     //   Java source line #373	-> byte code offset #157
/*     */     //   Java source line #374	-> byte code offset #164
/*     */     //   Java source line #387	-> byte code offset #176
/*     */     //   Java source line #378	-> byte code offset #186
/*     */     //   Java source line #376	-> byte code offset #189
/*     */     //   Java source line #377	-> byte code offset #191
/*     */     //   Java source line #387	-> byte code offset #203
/*     */     //   Java source line #380	-> byte code offset #213
/*     */     //   Java source line #381	-> byte code offset #220
/*     */     //   Java source line #384	-> byte code offset #227
/*     */     //   Java source line #387	-> byte code offset #237
/*     */     //   Java source line #385	-> byte code offset #246
/*     */     //   Java source line #387	-> byte code offset #253
/*     */     // Local variable table:
/*     */     //   start	length	slot	name	signature
/*     */     //   0	265	0	this	ImapSession
/*     */     //   4	252	1	mbox	Mailbox
/*     */     //   45	200	3	paged	PagedFolderData
/*     */     //   56	165	4	i4folder	ImapFolder
/*     */     //   93	12	5	localImapFolder1	ImapFolder
/*     */     //   116	68	5	e	Object
/*     */     //   189	3	5	e	ImapRenumberException
/*     */     //   133	78	6	localImapFolder2	ImapFolder
/*     */     //   246	5	7	localObject1	Object
/*     */     //   253	10	8	localObject2	Object
/*     */     // Exception table:
/*     */     //   from	to	target	type
/*     */     //   107	113	116	com/zimbra/common/service/ServiceException
/*     */     //   153	174	189	com/zimbra/cs/imap/ImapRenumberException
/*     */     //   28	97	246	finally
/*     */     //   107	137	246	finally
/*     */     //   147	176	246	finally
/*     */     //   186	203	246	finally
/*     */     //   213	237	246	finally
/*     */     //   246	250	246	finally
/*     */     //   24	97	253	finally
/*     */     //   107	137	253	finally
/*     */     //   147	176	253	finally
/*     */     //   186	203	253	finally
/*     */     //   213	237	253	finally
/*     */     //   246	255	253	finally
/*     */   }
/*     */   
/*     */   ImapFolder handleRenumberError(String key)
/*     */   {
/* 392 */     resetRenumber();
/* 393 */     ZimbraLog.imap.warn("could not replay due to too many renumbers");
/* 394 */     MANAGER.safeRemoveCache(key);
/* 395 */     return null;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */   static class AddedItems
/*     */   {
/* 402 */     boolean isEmpty() { return (this.numbered == null) && (this.unnumbered == null); }
/*     */     
/*     */     List<ImapMessage> numbered;
/*     */     List<ImapMessage> unnumbered;
/* 406 */     void add(MailItem item) { if (item.getImapUid() > 0) {
/* 407 */         (this.numbered == null ? (this.numbered = new java.util.ArrayList()) : this.numbered).add(new ImapMessage(item));
/*     */       } else {
/* 409 */         (this.unnumbered == null ? (this.unnumbered = new java.util.ArrayList()) : this.unnumbered).add(new ImapMessage(item));
/*     */       }
/*     */     }
/*     */     
/*     */     void sort() {
/* 414 */       if (this.numbered != null) {
/* 415 */         java.util.Collections.sort(this.numbered);
/*     */       }
/* 417 */       if (this.unnumbered != null) {
/* 418 */         java.util.Collections.sort(this.unnumbered);
/*     */       }
/*     */     }
/*     */   }
/*     */   
/*     */   public void notifyPendingChanges(PendingModifications pns, int changeId, com.zimbra.cs.session.Session source)
/*     */   {
/* 425 */     if (!pns.hasNotifications()) {
/* 426 */       return;
/*     */     }
/*     */     
/* 429 */     ImapHandler i4handler = this.handler;
/*     */     try {
/* 431 */       synchronized (this) {
/* 432 */         AddedItems added = new AddedItems();
/* 433 */         if (pns.deleted != null) {
/* 434 */           for (Map.Entry<com.zimbra.cs.session.PendingModifications.ModificationKey, PendingModifications.Change> entry : pns.deleted.entrySet()) {
/* 435 */             handleDelete(changeId, ((com.zimbra.cs.session.PendingModifications.ModificationKey)entry.getKey()).getItemId().intValue(), (PendingModifications.Change)entry.getValue());
/*     */           }
/*     */         }
/* 438 */         if (pns.created != null) {
/* 439 */           for (MailItem item : pns.created.values()) {
/* 440 */             handleCreate(changeId, item, added);
/*     */           }
/*     */         }
/* 443 */         if (pns.modified != null) {
/* 444 */           for (PendingModifications.Change chg : pns.modified.values()) {
/* 445 */             handleModify(changeId, chg, added);
/*     */           }
/*     */         }
/*     */         
/*     */ 
/* 450 */         if (!added.isEmpty()) {
/* 451 */           this.mFolder.handleAddedMessages(changeId, added);
/*     */         }
/*     */         
/* 454 */         this.mFolder.finishNotification(changeId);
/*     */       }
/*     */       
/* 457 */       if ((i4handler != null) && (i4handler.isIdle())) {
/* 458 */         i4handler.sendNotifications(true, true);
/*     */       }
/*     */     }
/*     */     catch (java.io.IOException e)
/*     */     {
/* 463 */       if (ZimbraLog.imap.isDebugEnabled()) {
/* 464 */         ZimbraLog.imap.debug("Failed to notify, closing %s", this, e);
/*     */       } else {
/* 466 */         ZimbraLog.imap.info("Failed to notify (%s), closing %s", new Object[] { e.toString(), this });
/*     */       }
/* 468 */       if (i4handler != null) {
/* 469 */         i4handler.close();
/*     */       }
/*     */     }
/*     */   }
/*     */   
/*     */   void handleDelete(int changeId, int id, PendingModifications.Change chg) {
/* 475 */     com.zimbra.cs.mailbox.MailItem.Type type = (com.zimbra.cs.mailbox.MailItem.Type)chg.what;
/* 476 */     if (id <= 0)
/* 477 */       return;
/* 478 */     if (type == com.zimbra.cs.mailbox.MailItem.Type.TAG) {
/* 479 */       this.mFolder.handleTagDelete(changeId, id, chg);
/* 480 */     } else if (id == this.mFolderId)
/*     */     {
/* 482 */       detach();
/*     */       
/*     */ 
/*     */ 
/*     */ 
/* 487 */       if (this.handler != null) {
/* 488 */         this.handler.close();
/*     */       }
/* 490 */     } else if (ImapMessage.SUPPORTED_TYPES.contains(type)) {
/* 491 */       this.mFolder.handleItemDelete(changeId, id, chg);
/*     */     }
/*     */   }
/*     */   
/*     */   private void handleCreate(int changeId, MailItem item, AddedItems added) {
/* 496 */     if ((item == null) || (item.getId() <= 0))
/* 497 */       return;
/* 498 */     if ((item.getFolderId() == this.mFolderId) && (((item instanceof com.zimbra.cs.mailbox.Message)) || ((item instanceof com.zimbra.cs.mailbox.Contact)))) {
/* 499 */       this.mFolder.handleItemCreate(changeId, item, added);
/*     */     }
/*     */   }
/*     */   
/*     */   private void handleModify(int changeId, PendingModifications.Change chg, AddedItems added) {
/* 504 */     if (((chg.what instanceof Tag)) && ((chg.why & 0x1000) != 0)) {
/* 505 */       this.mFolder.handleTagRename(changeId, (Tag)chg.what, chg);
/* 506 */     } else if (((chg.what instanceof Folder)) && (((Folder)chg.what).getId() == this.mFolderId)) {
/* 507 */       Folder folder = (Folder)chg.what;
/* 508 */       if (((chg.why & 0x4) != 0) && ((folder.getFlagBitmask() & com.zimbra.cs.mailbox.Flag.BITMASK_DELETED) != 0))
/*     */       {
/*     */ 
/*     */ 
/*     */ 
/* 513 */         if (this.handler != null) {
/* 514 */           this.handler.close();
/*     */         }
/* 516 */       } else if ((chg.why & 0x1100) != 0) {
/* 517 */         this.mFolder.handleFolderRename(changeId, folder, chg);
/*     */       }
/* 519 */     } else if (((chg.what instanceof com.zimbra.cs.mailbox.Message)) || ((chg.what instanceof com.zimbra.cs.mailbox.Contact))) {
/* 520 */       MailItem item = (MailItem)chg.what;
/* 521 */       boolean inFolder = (this.mIsVirtual) || (item.getFolderId() == this.mFolderId);
/* 522 */       if ((!inFolder) && ((chg.why & 0x100) == 0)) {
/* 523 */         return;
/*     */       }
/* 525 */       this.mFolder.handleItemUpdate(changeId, chg, added);
/*     */     }
/*     */   }
/*     */   
/*     */   public void updateAccessTime()
/*     */   {
/* 531 */     super.updateAccessTime();
/* 532 */     Mailbox mbox = this.mailbox;
/* 533 */     if (mbox == null) {
/* 534 */       return;
/*     */     }
/* 536 */     mbox.lock.lock();
/*     */     try {
/* 538 */       synchronized (this) {
/* 539 */         PagedFolderData paged = (this.mFolder instanceof PagedFolderData) ? (PagedFolderData)this.mFolder : null;
/* 540 */         if (paged != null) {
/* 541 */           MANAGER.updateAccessTime(paged.getCacheKey());
/*     */         }
/*     */       }
/*     */     } finally {
/* 545 */       mbox.lock.release();
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 553 */   static final int RESERIALIZATION_THRESHOLD = com.zimbra.common.localconfig.DebugConfig.imapSerializedSessionNotificationOverloadThreshold;
/*     */   
/*     */   private final class PagedFolderData implements ImapSession.ImapFolderData {
/*     */     private final String cacheKey;
/*     */     private final int originalSize;
/*     */     private PagedSessionData pagedSessionData;
/*     */     private Map<Integer, PendingModifications> queuedChanges;
/*     */     
/*     */     PagedFolderData(String cachekey, ImapFolder i4folder) {
/* 562 */       this.cacheKey = cachekey;
/* 563 */       this.originalSize = i4folder.getSize();
/* 564 */       this.pagedSessionData = (i4folder.getSessionData() == null ? null : new PagedSessionData(i4folder));
/*     */     }
/*     */     
/*     */     public int getId()
/*     */     {
/* 569 */       return ImapSession.this.getFolderId();
/*     */     }
/*     */     
/*     */     public int getSize()
/*     */     {
/* 574 */       return this.originalSize;
/*     */     }
/*     */     
/*     */     public synchronized boolean isWritable()
/*     */     {
/* 579 */       return this.pagedSessionData == null ? false : this.pagedSessionData.mOriginalSessionData.writable;
/*     */     }
/*     */     
/*     */ 
/*     */     public synchronized boolean hasExpunges()
/*     */     {
/* 585 */       if ((this.pagedSessionData != null) && (this.pagedSessionData.mOriginalSessionData.expungedCount > 0)) {
/* 586 */         return true;
/*     */       }
/* 588 */       if ((this.queuedChanges == null) || (this.queuedChanges.isEmpty())) {
/* 589 */         return false;
/*     */       }
/* 591 */       for (PendingModifications pms : this.queuedChanges.values()) {
/* 592 */         if ((pms.deleted != null) && (!pms.deleted.isEmpty())) {
/* 593 */           return true;
/*     */         }
/* 595 */         if ((pms.modified != null) && (!pms.modified.isEmpty())) {
/* 596 */           return true;
/*     */         }
/*     */       }
/* 599 */       return false;
/*     */     }
/*     */     
/*     */     public synchronized boolean hasNotifications()
/*     */     {
/* 604 */       if ((this.pagedSessionData != null) && (this.pagedSessionData.hasNotifications())) {
/* 605 */         return true;
/*     */       }
/* 607 */       return (this.queuedChanges != null) && (!this.queuedChanges.isEmpty());
/*     */     }
/*     */     
/*     */     synchronized boolean notificationsFull() {
/* 611 */       if ((this.queuedChanges == null) || (this.queuedChanges.isEmpty())) {
/* 612 */         return false;
/*     */       }
/*     */       
/* 615 */       int count = 0;
/* 616 */       for (PendingModifications pms : this.queuedChanges.values()) {
/* 617 */         count += pms.getScaledNotificationCount();
/*     */       }
/* 619 */       return count > ImapSession.RESERIALIZATION_THRESHOLD;
/*     */     }
/*     */     
/*     */     String getCacheKey() {
/* 623 */       return this.cacheKey;
/*     */     }
/*     */     
/*     */     public void doEncodeState(Element imap)
/*     */     {
/* 628 */       imap.addAttribute("paged", true);
/*     */     }
/*     */     
/*     */     public synchronized void endSelect()
/*     */     {
/* 633 */       this.pagedSessionData = null;
/*     */     }
/*     */     
/*     */     synchronized void restore(ImapFolder i4folder) throws ImapSessionClosedException, com.zimbra.common.service.ServiceException {
/* 637 */       ImapFolder.SessionData sdata = this.pagedSessionData == null ? null : this.pagedSessionData.asFolderData(i4folder);
/* 638 */       i4folder.restore(ImapSession.this, sdata);
/* 639 */       if ((this.pagedSessionData != null) && (this.pagedSessionData.mSessionFlags != null)) {
/* 640 */         int[] sflags = this.pagedSessionData.mSessionFlags;
/* 641 */         for (int i = 0; i < sflags.length; i += 2) {
/* 642 */           ImapMessage i4msg = i4folder.getByImapId(sflags[i]);
/* 643 */           if (i4msg != null) {
/* 644 */             i4msg.sflags = ((short)sflags[(i + 1)]);
/*     */           }
/*     */         }
/*     */       }
/*     */     }
/*     */     
/*     */     private PendingModifications getQueuedNotifications(int changeId) {
/* 651 */       if (this.queuedChanges == null) {
/* 652 */         this.queuedChanges = new java.util.TreeMap();
/*     */       }
/* 654 */       PendingModifications pns = (PendingModifications)this.queuedChanges.get(Integer.valueOf(changeId));
/* 655 */       if (pns == null) {
/* 656 */         this.queuedChanges.put(Integer.valueOf(changeId), pns = new PendingModifications());
/*     */       }
/* 658 */       return pns;
/*     */     }
/*     */     
/*     */     private synchronized void queueDelete(int changeId, int itemId, PendingModifications.Change chg) {
/* 662 */       getQueuedNotifications(changeId).recordDeleted(ImapSession.this.getTargetAccountId(), itemId, (com.zimbra.cs.mailbox.MailItem.Type)chg.what);
/*     */     }
/*     */     
/*     */     private synchronized void queueCreate(int changeId, MailItem item)
/*     */     {
/* 667 */       getQueuedNotifications(changeId).recordCreated(item);
/*     */     }
/*     */     
/*     */     private synchronized void queueModify(int changeId, PendingModifications.Change chg) {
/* 671 */       getQueuedNotifications(changeId).recordModified((MailItem)chg.what, chg.why, (MailItem)chg.preModifyObj);
/*     */     }
/*     */     
/*     */ 
/*     */     synchronized void replay()
/*     */     {
/* 677 */       assert (ImapSession.this.mFolder != this);
/*     */       
/* 679 */       if (this.queuedChanges == null) {
/* 680 */         return;
/*     */       }
/*     */       
/* 683 */       ImapSession.this.resetRenumber();
/*     */       
/* 685 */       for (java.util.Iterator<Map.Entry<Integer, PendingModifications>> it = this.queuedChanges.entrySet().iterator(); it.hasNext();) {
/* 686 */         Map.Entry<Integer, PendingModifications> entry = (Map.Entry)it.next();
/* 687 */         ImapSession.this.notifyPendingChanges((PendingModifications)entry.getValue(), ((Integer)entry.getKey()).intValue(), null);
/* 688 */         it.remove();
/*     */       }
/*     */     }
/*     */     
/*     */     public void handleTagDelete(int changeId, int tagId, PendingModifications.Change chg)
/*     */     {
/* 694 */       queueDelete(changeId, tagId, chg);
/*     */     }
/*     */     
/*     */     public void handleTagRename(int changeId, Tag tag, PendingModifications.Change chg)
/*     */     {
/* 699 */       queueModify(changeId, chg);
/*     */     }
/*     */     
/*     */     public void handleItemDelete(int changeId, int itemId, PendingModifications.Change chg)
/*     */     {
/* 704 */       queueDelete(changeId, itemId, chg);
/*     */     }
/*     */     
/*     */     public void handleItemCreate(int changeId, MailItem item, ImapSession.AddedItems added)
/*     */     {
/* 709 */       queueCreate(changeId, item);
/*     */     }
/*     */     
/*     */     public void handleFolderRename(int changeId, Folder folder, PendingModifications.Change chg)
/*     */     {
/* 714 */       queueModify(changeId, chg);
/*     */     }
/*     */     
/*     */     public void handleItemUpdate(int changeId, PendingModifications.Change chg, ImapSession.AddedItems added)
/*     */     {
/* 719 */       queueModify(changeId, chg);
/*     */     }
/*     */     
/*     */ 
/*     */     public void handleAddedMessages(int changeId, ImapSession.AddedItems added) {}
/*     */     
/*     */     public void finishNotification(int changeId)
/*     */       throws java.io.IOException
/*     */     {
/* 728 */       ImapHandler handler = ImapSession.this.getHandler();
/* 729 */       if ((handler != null) && (handler.isIdle())) {
/*     */         try {
/* 731 */           ImapSession.this.reload();
/*     */         }
/*     */         catch (ImapSessionClosedException ignore) {}
/*     */       }
/*     */     }
/*     */     
/*     */     class PagedSessionData {
/*     */       ImapFolder.SessionData mOriginalSessionData;
/*     */       int[] mSavedSearchIds;
/*     */       int[] mDirtyChanges;
/*     */       int[] mSessionFlags;
/*     */       
/*     */       PagedSessionData(ImapFolder i4folder) {
/* 744 */         this.mOriginalSessionData = i4folder.getSessionData();
/* 745 */         if (this.mOriginalSessionData == null) {
/*     */           return;
/*     */         }
/*     */         
/*     */         int pos;
/* 750 */         if (this.mOriginalSessionData.savedSearchResults != null) {
/* 751 */           this.mSavedSearchIds = new int[this.mOriginalSessionData.savedSearchResults.size()];
/* 752 */           pos = 0;
/* 753 */           for (ImapMessage i4msg : this.mOriginalSessionData.savedSearchResults) {
/* 754 */             this.mSavedSearchIds[(pos++)] = i4msg.imapUid;
/*     */           }
/*     */         }
/*     */         int pos;
/* 758 */         if (!this.mOriginalSessionData.dirtyMessages.isEmpty()) {
/* 759 */           this.mDirtyChanges = new int[this.mOriginalSessionData.dirtyMessages.size() * 2];
/* 760 */           pos = 0;
/* 761 */           for (Map.Entry<Integer, ImapFolder.DirtyMessage> dentry : this.mOriginalSessionData.dirtyMessages.entrySet()) {
/* 762 */             this.mDirtyChanges[(pos++)] = ((Integer)dentry.getKey()).intValue();
/* 763 */             this.mDirtyChanges[(pos++)] = ((ImapFolder.DirtyMessage)dentry.getValue()).modseq;
/*     */           }
/*     */         }
/*     */         
/* 767 */         final short defaultFlags = (short)(ImapSession.this.getFolderId() != 4 ? 0 : 10);
/*     */         
/* 769 */         final List<Integer> sflags = new java.util.ArrayList();
/* 770 */         i4folder.traverse(new com.google.common.base.Function()
/*     */         {
/*     */           public Void apply(ImapMessage i4msg) {
/* 773 */             if ((i4msg.sflags & 0xFFFFFFEF) != defaultFlags) {
/* 774 */               sflags.add(Integer.valueOf(i4msg.imapUid));
/* 775 */               sflags.add(Integer.valueOf(i4msg.sflags));
/*     */             }
/* 777 */             return null;
/*     */           }
/*     */         });
/*     */         
/* 781 */         if (!sflags.isEmpty()) {
/* 782 */           this.mSessionFlags = com.zimbra.common.util.ArrayUtil.toIntArray(sflags);
/*     */         }
/*     */         
/*     */ 
/* 786 */         this.mOriginalSessionData.savedSearchResults = null;
/* 787 */         this.mOriginalSessionData.dirtyMessages.clear();
/*     */       }
/*     */       
/*     */       ImapFolder.SessionData asFolderData(ImapFolder i4folder) {
/* 791 */         if (this.mOriginalSessionData != null) {
/* 792 */           if (this.mSavedSearchIds != null) {
/* 793 */             this.mOriginalSessionData.savedSearchResults = new ImapMessage.ImapMessageSet();
/* 794 */             for (int uid : this.mSavedSearchIds) {
/* 795 */               this.mOriginalSessionData.savedSearchResults.add(i4folder.getByImapId(uid));
/*     */             }
/* 797 */             this.mOriginalSessionData.savedSearchResults.remove(null);
/*     */           }
/*     */           
/* 800 */           this.mOriginalSessionData.dirtyMessages.clear();
/* 801 */           if (this.mDirtyChanges != null) {
/* 802 */             for (int i = 0; i < this.mDirtyChanges.length; i += 2) {
/* 803 */               ImapMessage i4msg = i4folder.getByImapId(this.mDirtyChanges[i]);
/* 804 */               if (i4msg != null) {
/* 805 */                 this.mOriginalSessionData.dirtyMessages.put(Integer.valueOf(this.mDirtyChanges[i]), new ImapFolder.DirtyMessage(i4msg, this.mDirtyChanges[(i + 1)]));
/*     */               }
/*     */             }
/*     */           }
/*     */         }
/*     */         
/*     */ 
/* 812 */         return this.mOriginalSessionData;
/*     */       }
/*     */       
/*     */       boolean hasNotifications() {
/* 816 */         if (this.mOriginalSessionData == null) {
/* 817 */           return false;
/*     */         }
/* 819 */         return (this.mOriginalSessionData.tagsAreDirty) || (this.mDirtyChanges != null) || (this.mOriginalSessionData.expungedCount > 0);
/*     */       }
/*     */     }
/*     */   }
/*     */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/imap/ImapSession.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */